<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style> 
    img {
        float: left;
        width: 200px;
        margin-left: 30px;
        margin-top: 30px;
    }
    .title2 {
        clear: left;
    }
    </style>
</head>
<body>
    <h1 class="title1">图片列表1</h1>
    <p>
        元素浮动之后，周围的元素会重新排列，为了避免这种情况，使用 clear 属性。clear 属性指定元素两侧不能出现浮动元素。
    </p>
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <h1 class="title2">图片列表2</h1>
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
    <img src="https://goss1.cfp.cn/creative/vcg/800/version23/VCG41175510742.jpg" alt="" srcset="">
</body>
</html>